package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 舱单相关方信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author chenzheng
 */
@Data
public class ManifestScnBaseVO {

    @Schema(description = "外键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25731")
    private Long manifestId;

    @Schema(description = "相关方类型 shipper、consignee、notify", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestscn.partytypecode.notblank}")
    @Length(max = 10, message = "{manifestscn.partytypecode.length}")
    private String partyTypeCode;

    @Schema(description = "企业唯一识别码 前缀 USCI")
    @Length(max = 50, message = "{manifestscn.uniqueidentifierpre.length}")
    private String uniqueIdentifierPre;

    @Schema(description = "企业唯一识别码 后缀 12345678")
    @Length(max = 50, message = "{manifestscn.uniqueidentifierfix.length}")
    private String uniqueIdentifierFix;

    @Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotBlank(message = "{manifestscn.companyname.notblank}")
    @Length(max = 500, message = "{manifestscn.companyname.length}")
    private String companyName;

    @Schema(description = "公司地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 500, message = "{manifestscn.companyaddress.length}")
    private String companyAddress;

    @Schema(description = "国家代码")
    @Length(max = 2, message = "{manifestscn.countrycode.length}")
    private String countryCode;

    @Schema(description = "电话")
    @Length(max = 50, message = "{manifestscn.telephone.length}")
    private String telephone;

    @Schema(description = "邮箱")
    @Length(max = 50, message = "{manifestscn.email.length}")
    private String email;

    @Schema(description = "传真")
    @Length(max = 50, message = "{manifestscn.fax.length}")
    private String fax;

    @Schema(description = "城市")
    @Length(max = 50, message = "{manifestscn.city.length}")
    private String city;

    @Schema(description = "省份")
    @Length(max = 50, message = "{manifestscn.province.length}")
    private String province;

    @Schema(description = "AEO")
    @Length(max = 50, message = "{manifestscn.aeo.length}")
    private String aeo;

    @Schema(description = "邮政编码")
    @Length(max = 50, message = "{manifestscn.zipcode.length}")
    private String zipCode;


}
